/***************************************************************************************
****************************************************************************************
* FILE		: greenProcess.h
* Description	: 
*			  
* Copyright (c) 2020 by Simlife. All Rights Reserved.
* 
* History:
* Version		Name		Date				Description
   0.1		Alen			2020/06/06		Initial Version
   
****************************************************************************************
****************************************************************************************/


#ifndef _GREENPROCESS_H_
#define _GREENPROCESS_H_

#define green1Port _pc
#define green1PortAndPin _pc0
#define green1Pin PIN_0
#define green1PinReverse PIN_0_REVERSE
#define green1PortTypeControl _pcc
#define green1PortPullupControl _pcpu

#define GREEN1_ON() (green1PortAndPin = 1)
#define GREEN1_OFF() (green1PortAndPin = 0)

#define green2Port _pc
#define green2PortAndPin _pc1
#define green2Pin PIN_1
#define green2PinReverse PIN_1_REVERSE
#define green2PortTypeControl _pcc
#define green2PortPullupControl _pcpu

#define GREEN2_ON() (green2PortAndPin = 1)
#define GREEN2_OFF() (green2PortAndPin = 0)

#define green3Port _pc
#define green3PortAndPin _pc2
#define green3Pin PIN_2
#define green3PinReverse PIN_2_REVERSE
#define green3PortTypeControl _pcc
#define green3PortPullupControl _pcpu

#define GREEN3_ON() (green3PortAndPin = 1)
#define GREEN3_OFF() (green3PortAndPin = 0)

#define green4Port _pc
#define green4PortAndPin _pc3
#define green4Pin PIN_3
#define green4PinReverse PIN_3_REVERSE
#define green4PortTypeControl _pcc
#define green4PortPullupControl _pcpu

#define GREEN4_ON() (green4PortAndPin = 1)
#define GREEN4_OFF() (green4PortAndPin = 0)

#define green5Port _pc
#define green5PortAndPin _pc4
#define green5Pin PIN_4
#define green5PinReverse PIN_4_REVERSE
#define green5PortTypeControl _pcc
#define green5PortPullupControl _pcpu

#define GREEN5_ON() (green5PortAndPin = 1)
#define GREEN5_OFF() (green5PortAndPin = 0)

#define greenLeftPort _pa
#define greenLeftPortAndPin _pa1
#define greenLeftPin PIN_1
#define greenLeftPinReverse PIN_1_REVERSE
#define greenLeftPortTypeControl _pac
#define greenLeftPortPullupControl _papu

#define GREEN_LEFT_ON() (greenLeftPortAndPin = 1)
#define GREEN_LEFT_OFF() (greenLeftPortAndPin = 0)

#define greenRightPort _pa
#define greenRightPortAndPin _pa2
#define greenRightPin PIN_2
#define greenRightPinReverse PIN_2_REVERSE
#define greenRightPortTypeControl _pac
#define greenRightPortPullupControl _papu

#define GREEN_RIGHT_ON() (greenRightPortAndPin = 1)
#define GREEN_RIGHT_OFF() (greenRightPortAndPin = 0)

extern void initGreenNumberPin(void);
extern void initGreenLRControlPin(void);
extern void closeGreenNumberPin(void);
extern void closeGreenLRConrotlPin(void);
extern void greenProcess(void);

#endif